package stock.commons;

public class StockProductParsedData extends ProductParsedData {
	public void addValue(String value) {
		switch (this.counter) {
		case (1):
			setId(value.substring(1, value.length()).trim());
			break;
		case (2):
			setDescripcion(value.substring(1, value.length()).trim().replace("\"", "\\\""));
			break;
		case (3):
			if (!"null".equals(value)) {
				setCantidad(new Integer(value).intValue());
			} else {
				setCantidad(0);
			}
			break;
		}
		this.counter++;
	}
}
